<template>
  <div>
    <div>
      <ul>
        <li v-for="(item , index) in info" :key="item.houseCode" @click="arrive(index)">
            <p>{{item.desc}}</p>
            <p>{{item.price}}/元每月</p>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
import axios from 'axios'
export default {
  name: 'find',
  
   data(){
    return {
      info : null
    }
  },
  async created() {
    const { data } = await axios({
      url: ' http://liufusong.top:8080/houses' ,
    })
    this.info = data.body.list
    console.log(data.body.list)
  },
  methods :{
    arrive(index){
       this.$router.push({ name: 'content', query: { index } })
    }
  }
}
</script>

<style scoped >
li {
   list-style: none;
}

</style>
